const http=require("http")
const fs=require('fs')
let server=http.createServer((req,res)=>{
    res.setHeader("content-type","text/html;charset=utf-8");
let data=JSON.parse(fs.readFileSync('./data.json').toString())
let str='<ul>'
data.forEach(item=>{
    str += 
    
    
    `<li>用户名是:${item.username};   密码是${item.pwd}</li>`
})
str+='</ul>'

    res.write(str)
    res.end()
})

server.listen(8888)